"""Build rsvc"""


def scons():
    """Execute build"""
    Import('env', 'prereqs')

    if not prereqs.server_requested():
        return

    # rsvc-specific env
    denv = env.Clone()

    denv.require('argobots', 'protobufc')

    # ds_rsvc
    ds_rsvc = denv.d_library('rsvc', ['srv.c', 'srv_common.c', 'rpc.c'], install_off="../..")
    denv.Install('$PREFIX/lib64/daos_srv', ds_rsvc)


if __name__ == "SCons.Script":
    scons()
